create external table jms_dm.dm_report_site_errscan_detail_dt_sum 
(
scan_time  date COMMENT '扫描日期' ,
site_code   string COMMENT '网点编号' ,
site_name  string COMMENT '网点名称' ,
proxy_area_code  string COMMENT '代理区编号' ,
proxy_area_name  string COMMENT '代理区名称' ,
franchisees_code  string COMMENT '加盟商编号' ,
franchisees_name  string COMMENT '加盟商名称' ,
come_port_qty bigint COMMENT '进港件量' ,
err_collect_qty bigint COMMENT '错扫集货到件量' ,
leave_port_qty bigint COMMENT '出港件量' ,
err_arrival_qty bigint COMMENT '错扫卸车到件量' )
comment '集散到件错扫汇总表'
PARTITIONED BY ( dt string COMMENT '时间分区')
stored as parquet
LOCATION '/dw/hive/jms_dm.db/external/dm_report_site_errscan_detail_dt_sum'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');
